<%--
  Created by IntelliJ IDEA.
  User: 陈晓林
  Date: 2018/6/8
  Time: 13:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/style/reset.css">
    <link rel="stylesheet" href="/static/style/public.css">
    <%@include file="../../static/common/common.jsp"%>
    <script>
        $(function () {
            $("#myui").tree({
                url: '/menu/getEmployeeMenu.do',
                animate:true,
                formatter: function (node) {
                    return node.name;
                },
                onClick: function (node) {
                    $("#myui").tree('toggle',node.target);
                    if (node.url) {
                        var tab = $("#myTabs");
                        var exist = tab.tabs('exists', node.name);
                        if (exist) {
                            tab.tabs('select', node.name);
                        } else {
                            $("#myTabs").tabs('add', {
                                fit: true,
                                title: node.name,
                                closable: true,
                                content: '<iframe src="' + node.url + '" height="100%" width="100%"></iframe>'
                            })
                        }
                    }
                }
            });
        })
    </script>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north',height:70,split:true">
        <%-- <h1 align="center">叩丁狼员工管理系统</h1>--%>
        <div class="public-header-warrp">
            <div class="public-header">
            <div class="content">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="/static/images/logo.png"/>
                <div class="public-header-admin fr">
                    <p class="admin-name"><font color="green">您好！</font>
                        <shiro:principal property="realname"></shiro:principal>
                    </p>
                    <div class="public-header-fun fr">
                        <a href="/logout.do" class="public-header-loginout">安全退出</a>
                    </div>
                </div>
            </div>
        </div>
        </div>
    </div>
    <div data-options="region:'south',split:true" style="height:40px;">
        <p align="center">版本声明</p>
    </div>
    <div data-options="region:'west',split:true" style="width:200px;">
        <div class="easyui-accordion" fit="true">
            <div title="菜单">
                <ul id="myui">
                </ul>
            </div>
            <div title="待办事项"></div>
            <div title="公告"></div>
        </div>
    </div>
    <div data-options="region:'center'">
        <div id="myTabs" class="easyui-tabs" fit="true">
            <div title="欢迎光临">welcome</div>
        </div>

    </div>
</div>
</body>
</html>
